﻿#ifndef QMYCROSSITEM_H
#define QMYCROSSITEM_H

#include<QGraphicsObject>
#include <QPainter>

class QMyCrossItem:public QGraphicsObject
{
    Q_OBJECT
public:
    QMyCrossItem();
    void setselcetype(bool type);

protected:
    QRectF boundingRect() const Q_DECL_OVERRIDE;

    void paint(QPainter *painter,const QStyleOptionGraphicsItem *option,
               QWidget *widget) Q_DECL_OVERRIDE;

private:
    qreal m_scale;
    QPen pen;//创建画笔
    bool selectype;

public Q_SLOTS:
    void setitemscale(qreal scale);

};

#endif // QMYCROSSITEM_H
